home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20010306-20010921
/
000312_shifeux@hotmail.com_Tue Aug 14 14:40:36 EDT 2001.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
5KB
|
124 lines
Article: 12671 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!panix!howland.erols.net!news.maxwell.syr.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail
From: shifeux@hotmail.com (Shifeux)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Kermit Scripts and Shell Scripts
Date: 14 Aug 2001 11:29:56 -0700
Organization: http://groups.google.com/
Lines: 105
Message-ID: <336f652d.0108141029.39b5169f@posting.google.com>
References: <336f652d.0108130841.43ce0ed5@posting.google.com> <9l909g$bse$1@newsmaster.cc.columbia.edu> <336f652d.0108140545.1a1c8658@posting.google.com> <9lbdsm$35j$1@newsmaster.cc.columbia.edu>
NNTP-Posting-Host: 146.145.217.201
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 997813796 20928 127.0.0.1 (14 Aug 2001 18:29:56 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 14 Aug 2001 18:29:56 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:12671
I appologize for my 'jumbled' postings. I have several variations of
this script and I have ended up confusing the issue. The switch code
was just a different variation I tried when the IF and even XIF didn't
work for me. I plugged your piece of code into the script and I am
still getting the same result. The script crashes at the run <perl
script> command. What I am trying to do from a theory standpoint is
parse a directory listing on a remote machine to get a listing of the
files in a text file. This text file will be converted into a listing
and sent back to the remote system after I download the files in the
dir. I have a perl parse routine which does contain the
#!/usr/bin/perl in the first line (as a side note, my kermit script
does not contain a similar statement). The perl command will work
using the shell and using kermit, but when I use the 'run' command in
the script I have problems with the script itself. At the point of the
run command the script halts abruptly. It does not execute the perl
script at all which is indicated by no output file from the perl
script. I have commented out the run command line and added an echo
command and i see the echo and the script continues on as expected.
But when the run command is followed by the perl script name the
script ends abruptly. Am I missing something in the way kermit calls
upon the shell to execute the perl script?
fdc@watsun.cc.columbia.edu (Frank da Cruz) wrote in message news:<9lbdsm$35j$1@newsmaster.cc.columbia.edu>...
> In article <336f652d.0108140545.1a1c8658@posting.google.com>,
> Shifeux <shifeux@hotmail.com> wrote:
> : I am using: C-Kermit 7.0.197, 8 Feb 2000, for Data General DG/UX
> : R4.20 I am trying to call the perl script from within an IF statement
> : using the "run" command (I also toyed around with "exec") The perl
> : does work fine by itself. It seems like the IF construct is causing
> : the Kermit script to crash at the point of the run command. When I
> : comment out the IF statement the script runs fine. I have tried
> : various different things but nothing will let this run command run.
> : Here is a listing of the latest try at the if statement.
> :
> : if failure timeout
> :
> : minput 10 {No files found} {Total of}
> : switch \v(minput) {
> : :1, if failure write TRANSACTION-LOG Files Found\13\10, define
> : \%o 1, br
> : eak
> : :2, cp /kermit_scripts/\%r.termlog
> : /cleoa+/kermit_scripts/\%r.files, break
> : }
> : run /kermit_scripts/xxxxxxx.pl, pause 5, -
> : define \%o 1, break
> :
> :
> : input 10 {choice : }
> : if failure timeout
> :
> OK, this is all fractured and hard to read; I assume you're not trying to
> run a fractured original.
>
> "run /kermit_scripts/xxxxxxx.pl" should work if the xxxxxxx.pl file contains
> a first line that looks like:
>
> #!/usr/bin/perl
>
> and it has execute permission:
>
> 1. Can you run it from the shell prompt by typing its name?
>
> 2. If so, can you run it from Kermit by typing
> "run /kermit_scripts/xxxxxxx.pl" at the C-Kermit> prompt?
>
> Assuming the answer to both is yes, let's try to reconstruct your
> fractured script:
>
> minput 10 {No files found} {Total of}
> switch \v(minput) {
> :1, if failure write TRANSACTION-LOG Files Found\13\10
> define \%o 1
> break
> :2, cp /kermit_scripts/\%r.termlog /cleoa+/kermit_scripts/\%r.files
> break
> }
> run /kermit_scripts/xxxxxxx.pl
> pause 5
> define \%o 1
> break
>
> Well, it's a bit confusing. The RUN command looks like it should be
> a SWITCH clause (because of the BREAK) but it's outside the SWITCH
> statement. What's the BREAK for? And which IF statement are you talking
> about, that causes the script to crash? The only one I see is the IF FAILURE
> in case 1 of the SWITCH (which doesn't make much sense). Does the following
> make more sense?
>
> minput 10 {No files found} {Total of}
> if failure stop 1 MINPUT timed out.
>
> switch \v(minput) {
> :1, writeln TRANSACTION-LOG Files Not Found
> define \%o 1
> break
> :2, cp /kermit_scripts/\%r.termlog /cleoa+/kermit_scripts/\%r.files
> run /kermit_scripts/xxxxxxx.pl
> pause 5
> define \%o 1
> break
> }
>
> - Frank